home *** CD-ROM | disk | FTP | other *** search
- MERGE(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- MMEERRGGEE - Chooses an alternative value according to the value of a mask
-
- SSYYNNOOPPSSIISS
- MMEERRGGEE (([TTSSOOUURRCCEE==]_t_s_o_u_r_c_e,, [FFSSOOUURRCCEE==]_f_s_o_u_r_c_e,, [MMAASSKK==]_m_a_s_k))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- Fortran 90
-
- DDEESSCCRRIIPPTTIIOONN
- The MMEERRGGEE intrinsic function can be used for array construction. It
- chooses an alternative value according to the value of _m_a_s_k. This
- function accepts the following arguments:
-
- _t_s_o_u_r_c_e May be of any type
-
- _f_s_o_u_r_c_e Must be of the same type and type parameters as _t_s_o_u_r_c_e
-
- _m_a_s_k Must be of type logical
-
- MMEERRGGEE is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- RREETTUURRNN VVAALLUUEESS
- The result has the same type and type parameters as _t_s_o_u_r_c_e. The
- result is _t_s_o_u_r_c_e if _m_a_s_k is true and _f_s_o_u_r_c_e otherwise.
-
- EEXXAAMMPPLLEESS
- Example 1: Assume that _t_s_o_u_r_c_e, _f_s_o_u_r_c_e, and _m_a_s_k are arrays. Array
- _t_s_o_u_r_c_e is as follows:
-
- | 1 6 5 |
-
- | 2 4 6 |
-
- Array _f_s_o_u_r_c_e is as follows:
-
- | 0 3 2 |
-
- | 7 4 8 |
-
- Array _m_a_s_k is as follows:
-
- | T F T |
-
- | F F T |
-
- Also assume that the letter TT represents the value true and the letter
- FF represents the value false. The statement MMEERRGGEE(_t_s_o_u_r_c_e, _f_s_o_u_r_c_e,
- _m_a_s_k) generates the following:
-
- | 1 3 5 |
-
- | 7 4 6 |
-
- Example 2: The value of MMEERRGGEE((11..00,,00,,00,,kk>>00)) is [1.0] for _k = 5.
-
- Example 3: The value of MMEERRGGEE((11..00,,00,,00,,kk>>00)) is [0.0] for _k = -2.
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-